<?php


namespace app\im\model;


use app\cms\community\lib\QueryModel;

class imLiveUserModel extends QueryModel
{

    protected $table = 'im_live_user_table';


    public function getLiveByHashKey(string $hashKey): array
    {
        if ($hashKey === '') return [];
        $live = $this->where([
            'live_hash_key' => $hashKey
        ]) -> findOrEmpty();
        return $live -> isEmpty() ? $live -> toArray() : [];
    }

}